__author__ = 'alex'
import sys
from xml.sax import handler, saxutils

class SimplestParser(handler.ContentHandler):
    def __init__(self):
        handler.ContentHandler.__init__(self)

    def startDocument(self):
        pass
        #print 'start'

    def endDocument(self):
        pass
        #print 'end'


    def startElement(self, name, attrs):
        pass
        #print "start", name


    def endElement(self, name):
        pass
        #print "end", name

    def characters(self, content):
        pass
        #print content


class SimpleErrorHandler(handler.ErrorHandler):
    def fatalError(self, exception):
        pass

    def error(self, exception):
        pass

    def warning(self, exception):
        pass

class SimpleDTDHandler(handler.DTDHandler):
    def notationDecl(self, name, publicId, systemId):
        print "DTD CALLED!!!"

    def unparsedEntityDecl(self, name, publicId, systemId, ndata):
        print "DTD CALLED!!!"
        print "name = ", name
        print "publicId = ", publicId
        print "systemId = ", systemId
        print "ndata = ", ndata

class SimpleEntityResolver(handler.EntityResolver):
    pass